-- GENERATED SPELL FOR [Crusader Lord Dalfors] --


function spell0_31003(pUnit, Event) --@Avenger\'s Shield,n/a--
pUnit:FullCastSpellOnTarget(37554,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31003', 7000, 1)
end

function spell1_31003(pUnit, Event) --@Consecration,Self--
pUnit:FullCastSpellOnTarget(48819,pUnit)
pUnit:RegisterEvent('Sorts_31003', 8000, 1)
end

function spell2_31003(pUnit, Event) --@Exorcism,n/a--
pUnit:FullCastSpellOnTarget(48801,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31003', 0, 1)
end

function Sorts_31003(pUnit, Event)
local choix_sorts_31003 = math.random(0, 2)
if choix_sorts_31003 == 0 then
pUnit:RegisterEvent('spell0_31003', 1, 1)
end
if choix_sorts_31003 == 1 then
pUnit:RegisterEvent('spell1_31003', 1, 1)
end
if choix_sorts_31003 == 2 then
pUnit:RegisterEvent('spell2_31003', 1, 1)
end
end

function mob31003_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31003', math.random(1500, 3000), 1)
end

function mob31003_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31003_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31003_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31003, 1, 'mob31003_Action')
RegisterUnitEvent(31003, 2, 'mob31003_Leave')
RegisterUnitEvent(31003, 3, 'mob31003_Kill')
RegisterUnitEvent(31003, 4, 'mob31003_Die')
